package com.budwk.app.sqfwDoc.codeGeneratorV2.generate;

import com.deepoove.poi.XWPFTemplate;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.ByteArrayOutputStream;
import java.util.Map;

/**
 * @author ZY.Wang
 * @since 2024/1/23
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ResultOfPdfGenerator {

    private ByteArrayOutputStream pdfOS;

    private XWPFTemplate pdfXWPFTemplate;

    private Map<String, Object> bridgeMap;   // 这个参数用于传递一些想要自定义的参数

    public boolean getCreateSuccess() {
        return pdfXWPFTemplate != null;
    }

    public boolean createOSFlag() {
        return pdfOS != null && pdfOS.size() > 0;
    }
}
